package dd.prog2.musterExercises.ws12set07_tanks;

/**
 * Represents a basic tank, which is defined by a length and a radius.
 * 
 * @author Ruediger Lunde
 */
public class CylindricalTank extends BasicTank {
	private double length;
	private double radius;
	
	public CylindricalTank(double l, double r) {
		length = l;
		radius = r;
	}

	public double getSurface() {
		return 2 * Math.PI * radius * length + Math.PI * radius * radius;
	}

	public double getVolume() {
		return Math.PI * radius * radius * length;
	}
	
	public String toString() {
		return "CylindricalTank(length=" + length + ", radius=" + radius + ")";
	}
}
